Imports Castle.ActiveRecord


''' <summary>
'''	Gerado por MyGeneration usando o template ActiveRecord Object Mapper-1.0.3
'''	Criado em 14/08/2010 00:29:39
''' </summary>
''' <remarks></remarks>

<Serializable(), ActiveRecord("modulo", DynamicUpdate:= true)> _
Public Class Modulo
	Inherits ActiveRecordBase(Of Modulo)
	
	Private _cd_modulo As Integer
	Private _modulo_parent As Integer
	Private _modulo_nome As String
	Private _modulo_descricao As String
	Private _modulo_comando As String
	Private _modulo_tipo As Integer
	Private _modulo_ordem As Integer


	Private _Permissaos As IList(Of Permissao)

	<PrimaryKey(PrimaryKeyType.Sequence, SequenceName:="modulo_cd_modulo_seq")> _
	Public Property cd_modulo() As Integer
		Get
			Return _cd_modulo
		End Get
		Set(ByVal value As Integer)
			_cd_modulo = value
		End Set
	End Property

	<[Property]("modulo_parent")> _
	Public Property modulo_parent() As Integer
		Get
			Return _modulo_parent
		End Get
		Set(ByVal value As Integer)
			_modulo_parent = value
		End Set
	End Property

	<[Property]("modulo_nome")> _
	Public Property modulo_nome() As String
		Get
			Return _modulo_nome
		End Get
		Set(ByVal value As String)
			_modulo_nome = value
		End Set
	End Property

	<[Property]("modulo_descricao")> _
	Public Property modulo_descricao() As String
		Get
			Return _modulo_descricao
		End Get
		Set(ByVal value As String)
			_modulo_descricao = value
		End Set
	End Property

	<[Property]("modulo_comando")> _
	Public Property modulo_comando() As String
		Get
			Return _modulo_comando
		End Get
		Set(ByVal value As String)
			_modulo_comando = value
		End Set
	End Property

	<[Property]("modulo_tipo")> _
	Public Property modulo_tipo() As Integer
		Get
			Return _modulo_tipo
		End Get
		Set(ByVal value As Integer)
			_modulo_tipo = value
		End Set
	End Property

	<[Property]("modulo_ordem")> _
	Public Property modulo_ordem() As Integer
		Get
			Return _modulo_ordem
		End Get
		Set(ByVal value As Integer)
			_modulo_ordem = value
		End Set
	End Property

    <HasMany(GetType(Permissao), Table:="permissao", ColumnKey:="cd_modulo", Inverse:=True, Lazy:=True)> _
    Public Property Permissaos() As IList(Of Permissao)
        Get
            Return _Permissaos
        End Get
        Set(ByVal value As IList(Of Permissao))
            _Permissaos = value
        End Set
    End Property
End Class
